package fuxi01;

import java.util.Scanner;

public class

Demo8 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (true) {
            System.out.println(new java.text.SimpleDateFormat(
                    "yyyy - MM - dd - HH:mm:ss").format(new java.util.Date())
                          + ": 循环操作中～～按 n 退出循环");
            String input = scanner.nextLine();
            if (input.equalsIgnoreCase("n")) {
                break;
            }
        }
        scanner.close();
    }
}


